home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS08.ADF / Text / GuruMeditation < prev    next >
Text File  |  1986-04-02  |  12KB  |  267 lines

  1. Relay-Version: version B 2.10.2 9/18/84; site uwmcsd1.UUCP
  2. Posting-Version: version B 2.10.2 9/5/84; site ulowell.UUCP
  3. Path: uwmcsd1!uwmacc!uwvax!harvard!bbnccv!bbncca!wanginst!ulowell!page
  4. From: page@ulowell.UUCP (Bob Page)
  5. Newsgroups: net.micro.amiga
  6. Subject: Guru Meditation Numbers Explained
  7. Message-ID: <255@ulowell.UUCP>
  8. Date: 20 Mar 86 05:41:13 GMT
  9. Date-Received: 21 Mar 86 11:32:04 GMT
  10. Reply-To: page@ulowell.UUCP (Bob Page)
  11. Organization: University of Lowell
  12. Lines: 253
  13.  
  14.  
  15. (I picked this up off of Quantum Link, aka the Amiga Information Network.)
  16. (I cannot vouch for its accuracy, but thought you might be interested.   )
  17.  
  18.  
  19.  
  20.                     "You Too Can Be An Amiga Guru!"
  21.                            by Dave Boulton
  22.                ('New & Improved' version as of 11 Feb 86)
  23.  
  24.  Arrrrrrgh!, you snarl as the dreaded System Request box pops on to
  25.  the Workbench screen: 
  26.  
  27.     Software error - task held
  28.     Finish ALL disk activity
  29.     Select CANCEL to reset/debug
  30.  
  31.  You stare at the computerese for a moment, and then hit the CANCEL
  32.  button. The current screen is pushed down and you find yourself
  33.  staring at the orange and black finality of:
  34.  
  35.     Software Failure.          Press left mouse button to continue.
  36.                 Guru Meditation #02010009.00009310
  37.  
  38.  Many have wondered what the cryptic digits of the Guru Meditation
  39.  Number were all about. Perhaps the flashing orange box has some
  40.  strange mystical hypnotic powers. On the other hand, perhaps the
  41.  number is some sort of digitized mantra which allows the Yogis of
  42.  Los Gatos to attain perfect enlightenment. Whatever the
  43.  interpretation was, it was beyond the reach of the average user.
  44.  The most that the user is ever told is 'Not enough memory' or
  45.  maybe 'Software Failure'.
  46.  
  47.  In fact, the Guru Meditation Number (or simply 'alert number')
  48.  distills a lot of information about exactly what mishap has
  49.  befallen your Amiga. To those able to decipher it, the alert
  50.  number tells a great deal about who did what to whom as the
  51.  machine crashed. Not that there is much that can be done about the
  52.  situation after the fact; the information is mainly useful to help
  53.  the Software Gurus in debugging their programs or in diagnosing
  54.  what caused the fatal situation. It is a kind of post-mortem
  55.  report, explaining why the patient died.
  56.  
  57.  But there are times when it would be valuable to the user to know
  58.  precisely what happened to cause a crash. Other times, you may
  59.  just be curious as to what was going on. All of the Alerts (the
  60.  correct name for a Guru Meditation box) are defined in the header
  61.  file called "exec/alerts" provided to software developers. What
  62.  follows is an attempt at translating that information into a first
  63.  order approximation of English.
  64.  
  65.  Many of the error conditions that the Amiga OS detects are deeply
  66.  intertwined with the various internal data structures and
  67.  operating system calls. There isn't any way that I can define all
  68.  
  69.  of the terms used without reprinting most of the ROM Kernel Manual
  70.  here in the newsletter. However, if you are familiar with the
  71.  basics of how the system software works, then you can figure out a
  72.  great deal about why a particular program has crashed.
  73.  
  74.  
  75.  
  76.       Specific error code -----+         +--- Task Address
  77.                                |         |
  78.                        02 01 0009 . 00009310       
  79.                         |  |
  80.       Subsystem number -+  +--- General error code
  81.  
  82.  An alert number is divided into several parts. The section to the
  83.  right of the decimal point is simply the address in RAM of the
  84.  task that was running when the error occurred. This helps tell
  85.  someone who is debugging a program which of the many different
  86.  programs running in the Amiga caused the problem. In the example
  87.  given above, the running task was at 9310 hex. In this case that
  88.  happens to mean that the error occurred in CLI process number 1.
  89.  If I had been debugging a complex program which uses several
  90.  tasks, this information would be useful. As it happens, all it
  91.  tells me here is that the problem was in my software, not in any
  92.  of the system tasks.
  93.  
  94.  The left hand portion of the alert number is an encoded error
  95.  number. There are several fields with different meanings:
  96.  
  97.  The first two digits tell which module of the operating system
  98.  reported the error (this is technically known as the 'alert
  99.  object' or a Subsystem ID). In the example above the alert object
  100.  is 02, which tells me that the error was reported by the Graphics
  101.  library. 
  102.  
  103.  The first digit can be encoded in a funny way. The 'most
  104.  significant bit' of this digit says whether or not this alert is a
  105.  'dead-end'; that is, does the system have a chance of recovering
  106.  from the error or not. If the alert object had been given as 82
  107.  instead of 02, then the alert would be a 'dead-end'.
  108.  
  109.  In practice, this is a pretty narrow distinction. By the time you
  110.  have gotten to the Alert Box the system is in such dire straits
  111.  that the only choices left are to reboot, or to enter the system
  112.  debugger. The 'dead-end' bit could possibly cause some confusion
  113.  if you aren't used to dealing in hexadecimal. If the first digit
  114.  of the alert object is ever greater than 7 (hexadecimal) then
  115.  subtract 8 from it. Thus if the first two digits were B1, then the
  116.  alert is a dead-end error reported by the Workbench (Subsystem ID
  117.  code 31). (B minus 8 equals 3, for those of you without the
  118.  required 16 fingers!)
  119.  
  120.  The Subsystem ID codes are as follows:
  121.  
  122.  Exec Library        01     Console Device      11
  123.  Graphics Library    02     GamePort Device     12
  124.  Layers Library      03     Keyboard Device     13
  125.  Intuition Library   04     TrackDisk Device    14
  126.  Math Library        05     Timer Device        15
  127.  CList Library       06     CIA Resource        20
  128.  DOS Library         07     Disk Resource       21
  129.  RAM Library         08     Misc Resource       22
  130.  Icon Library        09     BootStrap           30
  131.  Audio Device        10     Workbench           31
  132.  
  133.  The next two digits specify the general type of error which has
  134.  occurred. For many specialized types of errors this field is 00,
  135.  instead of one of the general error codes below. This field is
  136.  often very useful, since the user can easily tell such things as
  137.  out-of-memory conditions, and missing libraries or device drivers
  138.  (if you have deleted files from the LIBS or DEVS directories of
  139.  your boot disk). In the example given above the general error code
  140.  is 01, which means the the Graphics Library was not able to find
  141.  enough free memory to allocate for some reason.
  142.  
  143.  The general error codes are:
  144.  
  145.  Insufficient memory   01    OpenDevice error    04
  146.  MakeLibrary error     02    OpenResource error  05
  147.  OpenLibrary error     03    I/O error           06
  148.  
  149.  The last four digits of the alert number give specific information
  150.  about exactly what error has occurred. The interpretation of the
  151.  specific error code depends on which subsystem we are talking
  152.  about. Each subsystem reuses the same values for the specific
  153.  error code with different meanings. In our example the specific
  154.  error code is 0009. Since we are talking about an error in the
  155.  graphics library, we determine that the error is called
  156.  'TextTmpRas' which means that a call to the Text() routine (trying
  157.  to draw characters on the screen) ran out of memory when it tried
  158.  to allocate memory for a TmpRas (temporary raster work area) data
  159.  structure.
  160.  
  161.  If the error had been in a different subsystem (say the Intuition
  162.  library) then the same error code of 0009 would have had a
  163.  completely different interpretation (for Intuition it would mean
  164.  that the Screen Type parameter to an OpenScreen call was not a
  165.  valid type).
  166.  
  167.  There is one special case in dealing with Guru Meditation Numbers.
  168.  Everything that we have discussed so far has to do with alerts
  169.  that are detected and generated by the Amiga ROM Kernel. There is
  170.  another case, which is when an alert is caused by a 68000
  171.  processor exception (or 'trap'). Whenever a CPU trap occurs (for
  172.  instance, an illegal opcode is executed) the Exec will generally
  173.  cause an alert. A program can intercept this trap processing, and
  174.  insert its own 'trap handler' to perform some other function, but
  175.  usually these traps end up causing an alert. When this happens,
  176.  the left hand part of the guru number will be a small value. The
  177.  subsystem ID and the general error code will both be zero. The
  178.  specific error code will be the 'trap number' of the trap that
  179.  occurred. The trap numbers are part of the 68000 chip, and are not
  180.  assigned by the ROM kernel like other error codes are.
  181.  
  182.  The following is a list of all the possible CPU traps. A few of
  183.  these will never show up as an alert because they are always
  184.  handled by the ROM Kernel. I list all of them here for
  185.  completeness (and just in case I'm wrong, and they ever _do_ show
  186.  up).
  187.  
  188.  Bus Error              02      Priviledge Violation   08
  189.  Address Error          03      Instruction Trace      09
  190.  Illegal Instruction    04      Line A Emulation       0A
  191.  Divide by Zero         05      Line F Emulation       0B
  192.  
  193.  CHK instruction        06      TRAP 0 ... 15          20 ... 2F
  194.  TRAPV (Overflow)       07
  195.  
  196.  The following is a list of the specific error codes and a short
  197.  comment about their meaning. The descriptions are a slightly
  198.  edited version of the exec/alerts file, so they are very cryptic.
  199.  
  200.  Exec Library
  201.  ExcptVect      81000001    CPU trap vector checksum
  202.  BaseChkSum     81000002    ExecBase checksum error
  203.  LibChkSum      81000003    library checksum failure
  204.  LibMem         81000004    no memory to make library
  205.  MemCorrupt     81000005    corrupted free memory list
  206.  IntrMem        81000006    no memory for interrupt servers
  207.  
  208.  Graphics Library
  209.  CopDisplay     82010001    copper display list, no memory
  210.  CopInstr       82010002    copper instruction list, no mem.
  211.  CopListOver    82000003    copper list too long
  212.  CopIListOver   82000004    copper intermediate list too long
  213.  CopListHead    82010005    copper list head, no memory
  214.  LongFrame      82010006    long frame, no memory
  215.  ShortFrame     82010007    short frame, no memory
  216.  FloodFill      82010008    flood fill, no memory
  217.  TextTmpRas     02010009    text, no memory for TmpRas
  218.  BltBitMap      8201000A    BltBitMap, no memory
  219.  
  220.  Intuition Library
  221.  GadgetType     84000001    unknown gadet type
  222.  CreatePort     84010002    create port, no memory
  223.  ItemAlloc      84010003    item plane alloc, no memory
  224.  SubAlloc       84010004    sub alloc, no memory
  225.  PlaneAlloc     84010005    plane alloc, no memory
  226.  ItemBoxTop     84000006    item box top < RelZero
  227.  OpenScreen     84010007    open screen, no memory
  228.  OpenScrnRast   84010008    OpenScreen's AllocRast, no mem.
  229.  SysScrnType    84000009    open sys screen, unknown type
  230.  AddSWGadget    8401000A    add SW gadgets, no memory
  231.  OpenWindow     8401000B    open window, no memory
  232.  BadState       8400000C    Bad State Return entering Int.
  233.  BadMessage     8400000D    Bad Message received by IDCMP
  234.  WeirdEcho      8400000E    Weird echo causing problem
  235.  NoConsole      8400000F    couldn't open the Console Device
  236.  
  237.  DOS Library
  238.  
  239.  StartMem       07010001    no memory at startup
  240.  EndTask        07000002    EndTask didn't
  241.  QPktFail       07000003    Qpkt failure
  242.  AsyncPkt       07000004    Unexpected packet received
  243.  FreeVec        07000005    Freevec failed
  244.  DiskBlkSeq     07000006    Disk block sequence error
  245.  BitMap         07000007    Bitmap corrupt
  246.  KeyFree        07000008    Key already free
  247.  BadChkSum      07000009    Invalid checksum
  248.  DiskError      0700000A    Disk Error
  249.  KeyRange       0700000B    Key out of range
  250.  BadOverlay     0700000C    Bad overlay
  251.  
  252.  TrackDisk Device
  253.  TDCalibSeek    14000001    calibrate: seek error
  254.  TDDelay        14000002    delay: error on timer wait
  255.  
  256.  Timer Device
  257.  TMBadReq       15000001    bad request
  258.  
  259.  Disk Resource
  260.  DRHasDisk      21000001    get unit: already has disk
  261.  DRIntNoAct     21000002    interrupt: no active unit
  262.  
  263.  BootStrap
  264.  BootError      30000001    boot code returned an error
  265.  
  266.  *** End of File ***
  267.